#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n, a[105], mx = 0;
    cin>>n;
    for(int i = 1; i <= n; ++i)
        cin>>a[i];
    for(int l = 1, r = 1; r <= n; r++)
    {
        if(a[r] != a[l])
        {
            mx = max(mx, r - l);
            l = r;
        }
    }
    cout<<mx;
    return 0;
}

